//Kyle Marshall
//Assignment 3
//marshaky@onid.oregonstate.edu
//cs362

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

//testing the updateCoins function in dominion.c
int main (int argc, char** argv) {
  struct gameState G;
  int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, 
           sea_hag, tribute, smithy};
  int i;
  int seed = 1000;

  memset(&G, 23, sizeof(struct gameState)); 
  
  initializeGame(2, k, seed, &G);
  //whip all cards of coin cards
  for (i = 0; i < G.handCount[0]; i++)
    {
      G.hand[0][i] = 0;
    } 

  updateCoins(0,&G,0);
  assert(G.coins == 0);

  G.hand[0][0]= copper;
  G.hand[0][1]= silver;
  G.hand[0][2]= gold;
  updateCoins(0,&G,0);
  assert(G.coins == 6);
  updateCoins(0,&G,2);
  assert(G.coins == 8);
  printf("All Tests Passed\n");

return 0;
}